package CharacterDevelop;

import java.util.Scanner;

/**
 * ClassName:StringTest010
 * Package:CharacterDevelop
 * Description:
 *
 * @Author:ZhangXin
 * @Create2023/1/16-15:07
 * @Version:v1.0
 */
public class StringTest010 {
    public static void main(String[] args) {
        //获取一个手机号码
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入您的手机号码：");
        String phoneNumber =sc.next();
        //截取手机号码前三位
        String start = phoneNumber.substring(0, 3);
        //截取手机号码后面四位
        String end = phoneNumber.substring(7);
        String result = start + "****" + end;
        System.out.println(result);
    }

}
